
<?php 


// Вид ID		000		  333     222      111



 
mysql_select_db("b115103_upsensedb", $dbcnx);
$result = mysql_query("SELECT * FROM user_info", $dbcnx);

//echo $result."<br/>";

$datalength = mysql_num_rows($result);
$part1 = 999 - $datalength;



$telnum = $_POST['numusr'];
do {
    $telnum = intval($telnum / 5);
}while ($telnum > 999);
$part2 = $telnum;

//town code
$part3 = 000;


// База Городов
$ukraine;
$russia;
$belarus;
$kazahstan;
$moldova;
$latvia;


//nameGen
$part4 = 4;
$codename = ord("п");
//$codename = ord($_POST['second_name']);
//echo "Код имени".$codename.'<br/>';

//echo "Файл генератора подключен<br/>";

//echo "Generate UID-Num: 000		  333     222      111 : ";

//echo $part1.' - ';
//echo $part2.' - ';
//echo $part3.' - ';
//echo $part4.' - ';


$id_new_user = $part1.$part2.$part3.$part4;
//echo "<br/>Результат UID: ".$id_new_user."<br/>";


?>